#ifndef MULTICOLUMNFILTERPROXYMODEL_H
#define MULTICOLUMNFILTERPROXYMODEL_H

#include "precomp.h"

//#include <QSortFilterProxyModel>
//#include <QWidget>

class MultiColumnFilterProxyModel : public QSortFilterProxyModel
{
    Q_OBJECT
public:
    explicit MultiColumnFilterProxyModel(QObject *parent = nullptr);

    void setFilterPatterns(const QMap<int, QString> &patterns);
    void setFilterPattern(const QVector<QStringList> &pattern);

protected:
    bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;

private:
    QMap<int, QRegularExpression> m_filterPatterns;
    QVector<QStringList>  m_filterPattern;
};

#endif // MULTICOLUMNFILTERPROXYMODEL_H
